<?php

function extract_zip($zipfile, $targetfolder)
{
    logging\info("正在解压缩 %s 到 %s", $zipfile, $targetfolder);
    $zip = new ZipArchive;
    $res = $zip->open($zipfile);
    if ($res === true) {
        $zip->extractTo($targetfolder);
        $zip->close();
    } else {
	logging\info("解压缩失败");
	exit(1);
    }
}
